package com.elinshaw;

public interface RunnableQueue {

    /**
     * 有新任务先到任务队列
     *
     * @param runnable
     */
    void offer(Runnable runnable);

    /**
     * 工作线程获取Runnable
     *
     * @return
     */
    Runnable take() throws InterruptedException;

    /**
     * 获取任务队列数量
     *
     * @return
     */
    int size();

}
